﻿using System;
using System.Collections.Generic;
using System.Text;

namespace 部分类和密封类
{
    //部分类
    public partial class peoson
    {
        //partial partial partial partial partial partial partial partial partial partial partial partial partial partial partial partial partial partial 
        private int _avg;
        public int Avg
        {
            get { return _avg; }
            set { _avg = value; }
        }
        public void a()
        {
            Console.WriteLine("我今年{0}，我是个{1}生", this.Avg, this.Gender);
        }
    }
    public partial class peoson
    {
        private char _gender;
        public char Gender
        {
            get { return _gender; }
            set { _gender = value; }
        }
        public void b()
        {
            Console.WriteLine("我今年{0}，我是个{1}生", this.Avg, this.Gender);
        }

    }

    //密封类可以继承别人的，但是不能被继承
    public sealed class aaa: peoson
    {
        //sealed sealed sealed sealed sealed sealed sealed sealed sealed sealed sealed sealed sealed sealed sealed sealed sealed sealed sealed sealed
        public void mm()
        {
            Console.WriteLine("我今年{0}，我是个{1}生", this.Avg, this.Gender);
        }
    }
    
}


        
    
      

